<?php
//------------------------
// 前台注册验证器
//-------------------------

namespace app\common\validate;

use think\Validate;


class Register extends Validate
{
    protected $rule = [
        'username|帐号'             => 'require|max:64|unique:user',
        'email|邮箱'                => 'require|email|unique:user',
        'password|密码'             => 'require|max:64',
        'confirm_password|确认密码' => 'require|confirm:password',
        'verify|验证码'             => 'require|captcha',
        'mustclick'                 => 'require'
    ];

    protected $message = [
        'username.require'                  => '请输入用户名',
        'password.require'                  => '请输入密码',
        'confirm_password.confirm'          => '两次输入密码不一致',
        'verify.require'                    => '请输入验证码',
        'verify.captcha'                    => '验证码不正确',
        'mustclick.require'                 => '请阅读《用户注册协议》'
    ];
}